<?php
/**
 * Created by PhpStorm .
 * User: 杜磊磊
 * Date: 2020/7/10
 * Time: 16:33
 */
namespace app\api\controller;

use app\BaseController;
use think\Request;

class Logout extends BaseController
{
    public function index(Request $request)
    {
        //删除redis缓存
        $res = cache(config("redis.token_pre").$request->asscessToken,NUll);
        if ($res){
            return show(config("status.success"),"退出成功");
        }
        return show(config("status.error"),'退出失败');

    }
}